package com.yanqu.road.server.cmd.banquet.crossBanquet;

import com.yanqu.road.server.manger.banquet.BanquetMgr;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.pb.banquet.CrossBanquetProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;


@Cmd(code = Protocol.S_BANQUET_CROSS_GET_REWARD, desc = "获取跨服宴會的獎勵")
public class GetBanquetRewardCmd extends AbstractCommand {

	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		//门客技能加成
		int beautiesSkillAdd = BanquetMgr.getBanquetOpenSkillAddition(player);

		CrossBanquetProto.CrossBanquetGetRewardReq.Builder msg = CrossBanquetProto.CrossBanquetGetRewardReq.newBuilder();
		msg.setBeautiesSkillAdd(beautiesSkillAdd);
		YanQuMessage pbMsg = YanQuMessageUtils.buildMessage(Protocol.C_CROSS_BANQUET_REWARD, msg);
		GamePlayerMgr.sendPacket(player.getUserId(), pbMsg);
	}

	@Override
	public void sendData(GamePlayer player) {

	}
}
